#!/usr/bin/perl
#FindBin - Locate directory of original perl script

#Locates the full path to the script bin directory to 
#allow the use of paths relative to the bin directory.
#This allows a user to setup a directory tree for some 
#software with directories <root>/bin and <root>/lib , 
#and then the above example will allow the use of modules 
#in the lib directory without knowing where the software 
#tree is installed.

#EXPORTABLE VARIABLES
# $Bin         - path to bin directory from where script was invoked
# $Script      - basename of script from which perl was invoked
# $RealBin     - $Bin with all links resolved
# $RealScript  - $Script with all links resolved

use FindBin qw($Bin $Script $RealBin $RealScript);
use lib "$Bin/../lib";

print "$Bin\n$Script\n$RealBin\n$RealScript\n";